package com.finalist.entity;

import java.math.BigDecimal;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**
 * Entity - 套包 商品
 * 
 * @author Finalist IT Group
 * @version 3.0
 */
@Entity
@Table(name = "xx_package_product")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "xx_package_product_sequence")
public class PackageProduct extends BaseEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	 /**
     * 类别
     */
    public enum Category
    {

        /** 秒商城 */
        miaoShop,

        /** 微信商城 */
        weixinShop,

        /** app */
        appShop

    }
	/** 套包商品 */
	private Product product;
	
	 private Category category;
	 
	 /** 优惠价 */
	private BigDecimal preferentialPrice;
	
	 /** 添加关联的商品 */
	private Product products;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(nullable = false)
	public Product getProducts() {
		return products;
	}

	public void setProducts(Product products) {
		this.products = products;
	}

	public BigDecimal getPreferentialPrice() {
		return preferentialPrice;
	}

	public void setPreferentialPrice(BigDecimal preferentialPrice) {
		this.preferentialPrice = preferentialPrice;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(nullable = false)
	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}
	
	
}
